<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品销售统计-销量">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 数据分析 <span class="c-gray en">&gt;</span> 商品销售统计 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="btn-group">
  <a href="#"><span class="btn btn-primary radius">&nbsp;&nbsp;按销量&nbsp;&nbsp;</span></a>
  <a href="${contextPath}/product_sale_analytics/click_list"><span class="btn btn-default radius">按点击量</span></a>
</div>
<div class="page-container">
   <div class="text-c">
    <form action="${contextPath}/product_sale_analytics/sale_list" method="post" name="search_form" id="search_form">
        <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />  
        <table class="table search_table" >
          <tr>   
           <td>商品名称：</td>
           <td><input type="text" class="input-text  radius"  placeholder="商品名称" id="" name="productQo.proName" value="${orderDetailQo.productQo.proName}"></td>  
           <td>商品编号：</td>
           <td><input type="text" class="input-text  radius"  placeholder="商品编号" id="" name="productQo.prodId" value="${orderDetailQo.productQo.prodId}" ></td>
           <td>订单时间：</td>
           <td><input  type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',readOnly: true })" id="startDate" 
               value='${(orderDetailQo.startTime?string("yyyy-MM-dd"))!}' name="startTime"  class="input-text Wdate" style="width:45%;">
                                                至
               <input  type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'%y-%M-%d',readOnly: true })" id="endDate" 
               value='${(orderDetailQo.endTime?string("yyyy-MM-dd"))!}' name="endTime"    class="input-text Wdate" style="width:45%;">
           </td>
         </tr>
         <tr>
         <td colspan="6" style="text-align:center;" >
           <input class="btn btn-success radius" type="button"  onclick="search();"  value="搜索" />
           <input class="btn btn-success radius" type="button"  onclick="toIsEmpty();" value="重置" />
           <input class="btn btn-success radius" type="button"  onclick="slimport();"   value="导出" />
         </td>
         </tr>
      </table>
     </form>
    </div>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="l">
    </span>
    <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th >排名</th>
            <th >商品编号</th>
            <th >商品信息</th>
            <th >销量</th>
            <th >里程销售额</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody >
         <#list pagination.list as list> 
         <tr  class="text-c">
            <td>${(pagination.pageNo-1)*pagination.pageSize+list_index+1}</td>
            <td>${list[0]}</td>
            <td>${list[1]}</td>
            <td>${list[2]}</td>
            <td>${list[3]}</td>
            <td>
            <a href="javascript:;" onclick="detail(${list[0]});">导出</a>
            </td>
         </tr>
         </#list>
        </tbody>
    </table>
    <iframe id="exportIframe" src="" style="height: 0px;width: 0px;display: none; border: none;"></iframe>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>	
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/report/sale_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
	skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            $("#page").val(obj.curr);
            $("#search_form").submit();
        }
    }
})  

</script>